package com.kwin.test.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * @author : wangkai
 * @version V1.0
 * @Package com.kwin.test.entity
 * @Description:
 * @date 2021年06月10日 17:37
 **/

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("user")
public class User extends Model<User> {
    @TableId
    private Long id;
    @TableField(fill = FieldFill.INSERT)
    private String name;
    private int age;
    private String email;
    
    @Override
    protected Serializable pkVal() {
        return id;
    }
}